<!--[pnpageaddvar name=stylesheet value="modules/crpCalendar/pnstyle/style.css"]-->
<!--[crpcalendar_feeds]-->

<div class="z-menu">
    <!--[securityutil_checkpermission component="crpCalendar::" instance="::" level="ACCESS_COMMENT" assign="can_submit"]-->
    [&nbsp;<a href="<!--[pnmodurl modname="crpCalendar" type="user" func=$choosed_view|pnvarprepfordisplay]-->"><!--[gt text="Events list" domain="module_crpcalendar"]--></a>&nbsp;<!--[if $can_submit]-->|&nbsp;<a href="<!--[pnmodurl modname="crpCalendar" type="user" func="new"|pnvarprepfordisplay]-->"><!--[gt text="Submit event" domain="module_crpcalendar"]--></a>&nbsp;<!--[/if]-->]
</div>

<h4><!--[$t|pndate_format:"%B %Y"]--></h4>


<div class="crpcalendar-rss">
    <span class="event-date">
        <span class="event-month">
            <!--[$t|pndate_format:'%b']-->
        </span>
        <span class="event-day">
            <a href="<!--[pnmodurl modname="crpCalendar" type="user" func="day_view" t=$t|pnvarprepfordisplay]-->"><!--[$t|pndate_format:'%d']--></a>
        </span>
    </span>
</div>

<!--[gt text="Previous week" domain="module_crpcalendar" assign="pwchar"]-->
<!--[gt text="Next week" domain="module_crpcalendar" assign="nwchar"]-->
<!--[gt text="Yesterday" domain="module_crpcalendar" assign="pdchar"]-->
<!--[gt text="Tomorrow" domain="module_crpcalendar" assign="ndchar"]-->
<!--[crpcalendar_daynav date=$date t=$t container="div" separator="<br />" prev_week_char=$pwchar next_week_char=$nwchar prev_day_char=$pdchar next_day_char=$ndchar dateview="false"]-->

<br />

<table class="crpcalendar-table mini">

    <thead>
        <tr>
            <th></th>
            <!--[section name=dayHeader loop=$day_of_week_short]-->
            <th class="crpcalendar-reduced"><!--[$day_of_week_short[dayHeader]]--></th>
            <!--[/section]-->
        </tr>
    </thead>

</tbody>
<tr>
    <!--[if $displayweek]-->
    <td>
        <!--[crpcalendar_datetime_stamp datetime=$days.1 assign=weektime]-->
        <a href="<!--[pnmodurl modname="crpCalendar" type="user" func="week_view" t=$weektime|pnvarprepfordisplay]-->">
            <!--[pnimg modname='crpCalendar'  src=$crpcalendar_theme|cat:"/right_arrows.gif" __title='Weekly view']-->
        </a>
    </td>
    <!--[else]-->
    <td></td>
    <!--[/if]-->

    <!--[foreach from=$daysexpanded item=day name=cell]-->

    <td class="month-cell<!--[if in_array($day,$days)]--> day-on<!--[else]--> day-off-<!--[$crpcalendar_theme]--> <!--[/if]-->" style="vertical-align:top;">
        <div class="crpcalendar-reduced<!--[if $todayEv|pndate_format:"%Y%m%d" eq $day|pndate_format:"%Y%m%d"]--> day-today<!--[/if]-->">
            <!--[crpcalendar_datetime_stamp datetime=$day assign=daytime]-->
            <a href="<!--[pnmodurl modname="crpCalendar" type="user" func="day_view" t=$daytime|pnvarprepfordisplay]-->"><!--[$day|pndate_format:"%d"]--></a>
        </div>

        <!--[foreach from=$events item=event name=single]-->
        <!--[if $displayevents]-->
        <div>
            <a href="<!--[pnmodurl modname="crpCalendar" type="user" func="display" eventid=$event.eventid|pnvarprepfordisplay]-->" title="<!--[$event.title]-->">
                <!--[if $event.start_date|pndate_format:"%Y%m%d" eq $day|pndate_format:"%Y%m%d" && $event.day_event]-->
                <!--[pnimg modname='crpCalendar' src=$crpcalendar_theme|cat:"/allday_dot.gif" alt=$event.title]-->
                <!--[elseif $event.start_date|pndate_format:"%Y%m%d" eq $day|pndate_format:"%Y%m%d" && ($event.start_date|pndate_format:"%Y%m%d" eq $event.end_date|pndate_format:"%Y%m%d")]-->
                <!--[pnimg modname='crpCalendar' src=$crpcalendar_theme|cat:"/event_dot.gif" alt=$event.title]-->
                <!--[elseif ($event.start_date|pndate_format:"%Y%m%d" neq $event.end_date|pndate_format:"%Y%m%d") && ($day|pndate_format:"%Y%m%d" >= $event.start_date|pndate_format:"%Y%m%d") && ($day|pndate_format:"%Y%m%d" <= $event.end_date|pndate_format:"%Y%m%d")]-->
                <!--[pnimg modname='crpCalendar' src=$crpcalendar_theme|cat:"/monthdot_3.gif" alt=$event.title]-->
                <!--[/if]-->
            </a>
        </div>
        <!--[/if]-->
        <!--[/foreach]-->

    </td>

    <!--[assign var=point value=$smarty.foreach.cell.index+1]-->
    <!--[if $point % 7 == 0]-->
</tr>
<tr>
    <!--[if !$smarty.foreach.cell.last && $displayweek]-->
    <td>
        <!--[crpcalendar_datetime_stamp datetime=$daysexpanded.$point assign=weektime]-->
        <a href="<!--[pnmodurl modname="crpCalendar" type="user" func="week_view" t=$weektime|pnvarprepfordisplay]-->">
            <!--[pnimg modname='crpCalendar'  src=$crpcalendar_theme|cat:"/right_arrows.gif" __title='Weekly view']-->
        </a>
    </td>
    <!--[else]-->
    <td></td>
    <!--[/if]-->
    <!--[/if]-->

    <!--[/foreach]-->
</tr>
</tbody>
</table>